package com.hu.zhcc.shiro.controller.HealthIntervention;

import com.hu.zhcc.shiro.entity.bo.HealthIntervention.Disease;
import com.hu.zhcc.shiro.service.HealthIntervention.DiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/disease")
public class DiseaseController {
    @Autowired
    public DiseaseService service;
    //查询所有信息
    @GetMapping("")
    public ResponseEntity<List<Disease>> allDisease(){
        List<Disease> diseases = service.selectByPrimaryKeyList();
        System.out.println(diseases);
        return ResponseEntity.ok(diseases);
    }
}
